﻿@model GameSchool.Models.OnTheFlyModels.LevelOverviewList

@{
    ViewBag.Title = "LevelOverview";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>LevelOverview</h2>

@if (Model != null)
{
    <fieldset>
    
    <legend><h3>@Html.DisplayFor(model => model.CourseName)</h3></legend>

        @foreach(var item in Model)
    {
        <table>
            <colgroup>
                <col span="1" style="background-color:lawngreen"/>
                <col style="background-color: lightcoral"/>
            </colgroup>
            <tr>
                <th>Id:</th>
                <th>Nr:</th>
                <th>Nafn:</th>
                <th>Staða:</th>
            </tr>
            <tr>
                <td>@Html.DisplayFor(itemModel => item.LevelId)</td>
                <td>@Html.DisplayFor(itemModel => item.LevelNumber)</td>
                <td>@Html.DisplayFor(itemModel => item.LevelName)</td>
                <td>@Html.DisplayFor(itemModel => item.State)</td>
            </tr>                                                
        </table>
    }
    </fieldset>
}
@*else
{
    <h3>NULL reference villa!!!</h3>
}*@